package kr.saeildamil.androidstudty.ch17;

import java.util.ArrayList;

import android.app.Activity;
import android.content.res.Configuration;
import android.os.Bundle;
import android.widget.Toast;

public class SaveCurve extends Activity {
	private MyView vw;
	ArrayList<Vertex> arVertex;
	int  count;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
	
/*		if (savedInstanceState==null){
			arVertex = new ArrayList<Vertex>();
		}else{
			arVertex = (ArrayList<Vertex>) savedInstanceState.getSerializable("Curve");
		}*/
		arVertex = new ArrayList<Vertex>();
		vw = new MyView(this, arVertex);
		setContentView(vw);
	}
	
/*	@Override
	protected void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
		outState.putSerializable("Curve", arVertex);
	}*/
	
	@Override
	public void onConfigurationChanged(Configuration newConfig) {
		super.onConfigurationChanged(newConfig);
		count++;
		Toast.makeText(this, "count = " + count, Toast.LENGTH_LONG).show();
	}
}








